Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Specifying the Size of an Image Buffer

You can now specify the size of the image buffer used by your image compressor or decompressor component. When your component calls the ImageCodecPreDecompress or ImageCodecPreCompress function, you can specify the size of the buffer as follows:

  1. In the CodecDecompressParams or CodecCompressParams record, set the codecWantsSpecialScaling flag in the flags field of the CodecCapabilities record.
  2. Provide values for the requestedBufferWidth and requestedBufferHeight fields in the CodecDecompressParams or CodecCompressParams record.

This is illustrated in Listing 1 .

Listing 1 Specifying the size of an image buffer for a codec

p->capabilities->flags |= codecWantsSpecialScaling;
p->requestedBufferWidth = 720;
p->requestedBufferHeight = 480;

© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |